package com.yt.order.provider.dao.impl;

import com.yt.core.dao.GenericDaoImpl;
import com.yt.order.api.model.Reservation;
import com.yt.order.provider.dao.ReservationDao;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by liujunshi on 16-1-22.
 */
public class ReservationDaoImpl extends GenericDaoImpl<Reservation, Long> implements ReservationDao {
	public ReservationDaoImpl() {
		setNameSpace("com.yt.order.reservation");
	}

	@Override
	public void updateStatus(String ids, String status) {
		Map<String, String> params = new HashMap<String, String>();
		params.put("ids", ids);
		params.put("status", status);
		getSqlSession().update(getNameSpace() + ".updateStatusByIds", params);
	}

	@Override
	public void updateConfirmed(String ids, String confirmed) {
		Map<String, String> params = new HashMap<String, String>();
		params.put("ids", ids);
		params.put("confirmed", confirmed);
		getSqlSession().update(getNameSpace() + ".updateConfirmedByIds", params);
	}
}
